package com.bocai.grainshop.order.feign;

import com.bocai.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Component
@FeignClient("grainshop-product")
public interface ProductFeignService {

    @GetMapping("/product/spuinfo/skuId/{id}")
    R getSpuInfoBySpuId(@PathVariable("id") Long skuId);

    @RequestMapping("/product/skuinfo/info/{skuId}")
    R info(@PathVariable("skuId") Long skuId);

    @GetMapping("/product/skusaleattrvalue/StringList/{skuId}")
    List<String> getSalaAttrToString(@PathVariable("skuId") Long skuId);

    @RequestMapping("/product/spuinfodesc/info/{spuId}")
    R getSpuPic(@PathVariable("spuId") Long spuId);
}
